package cn.jawar.learn.spring.hellospring.web;

import cn.jawar.learn.spring.hellospring.pojo.dto.UserDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dongs
 */
@RestController
@RequestMapping("hello")
public class HelloController {

    @GetMapping("user")
    public UserDTO helloUser(String userName) {
        return new UserDTO().setName(userName).setAge(10);
    }

}
